<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extras-shiro" >
<head>
    <meta charset="UTF-8">
    <title>商品评论</title>
    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body style="background-color: aliceblue">



<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>商品评价----------用户对该商品的信息评价</small>
                </h1>
            </div>
        </div>
    </div>

    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>用户名</th>
                    <th>评论</th>
                    <th>评论日期</th>
                    <th>操作</th>
                </tr>
                </thead>
                <!--查询评论处理-->
                <tbody>
                <tr th:each="comment:${commentList}">
                    <td th:text="${comment.getUsercount()}">用户</td>
                    <td th:text="${comment.getDiscuss()}">评论</td>
                    <td th:text="${comment.getTimes()}">日期</td>
                    <td>删除</td>
                </tr>
                </tbody>
            </table>
            <div class="col-md-3">
                <a class="btn btn-primary" th:href="@{/book/bookList}">返回</a>
            </div>
            <div class="col-md-5">
                <p ><strong>当前</strong> <span th:text="${pageInfo.pageNum}"></span><strong> 页,总 </strong><span th:text="${pageInfo.pages}"></span><strong> 页,共</strong> <span th:text="${pageInfo.total}"></span><strong> 条记录</strong></p>

            </div>

            <div class="col-md-4">
                <div class="row">
                    <div class="col-md-12">
                        <a class="btn btn-primary" th:href="@{/book/toComment}">首页</a>
                        <a class="btn btn-primary" th:href="@{/book/toComment(pageNum=${pageInfo.hasPreviousPage}?${pageInfo.prePage}:1)}">上一页</a>
                        <a class="btn btn-primary" th:href="@{/book/toComment(pageNum=${pageInfo.hasNextPage}?${pageInfo.nextPage}:${pageInfo.pages})}">下一页</a>
                        <a class="btn btn-primary" th:href="@{/book/toComment(pageNum=${pageInfo.pages})}">尾页</a>
                    </div>
                </div>
            </div>

        </div>
    </div>

</div>

</body>
</html>